<!--  -->
<script setup>
const inputValue = defineModel()
defineProps({ label: String, placeholder: String })
defineEmits(['input'])
</script>

<template>
  <div class="info-item">
    <label v-if="label" :for="label">{{ label }}</label>
    <input @input="$emit('input', $event)" class="info-input" type="password" :id="label" v-model="inputValue" :placeholder="placeholder">
  </div>
</template>

<style scoped lang="scss">
.info-item {
  display: flex;
  align-items: center;
  position: relative;
  gap: 10px;

  .info-input {
    flex: 1;
    width: 250px;
    outline: none;
    padding: 4px 11px;
    font-size: 14px;
    line-height: 1.5;
    color: inherit;
    background-color: var(--bgc-02);
    border: 1px solid var(--border-primary);
    border-radius: 2px;
    

    &:hover {
      border-color: #4d9f00;
    }
  }
}
</style>
